Optimal. Leaf size=212 \[ \frac {\left (a^2-b^2 \sqrt {-c^2}\right ) \tan (e+f x) (d \tan (e+f x))^m \, _2F_1\left (1,m+1;m+2;-\frac {c \tan (e+f x)}{\sqrt {-c^2}}\right )}{2 f (m+1)}+\frac {\left (a^2+b^2 \sqrt {-c^2}\right ) \tan (e+f x) (d \tan (e+f x))^m \, _2F_1\left (1,m+1;m+2;\frac {c \tan (e+f x)}{\sqrt {-c^2}}\right )}{2 f (m+1)}+\frac {4 a b (c \tan (e+f x))^{3/2} (d \tan (e+f x))^m \, _2F_1\left (1,\frac {1}{4} (2 m+3);\frac {1}{4} (2 m+7);-\tan ^2(e+f x)\right )}{c f (2 m+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.71, antiderivative size = 212, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3670, 15, 1831, 364, 1286} \[ \frac {\left (a^2-b^2 \sqrt {-c^2}\right ) \tan (e+f x) (d \tan (e+f x))^m \, _2F_1\left (1,m+1;m+2;-\frac {c \tan (e+f x)}{\sqrt {-c^2}}\right )}{2 f (m+1)}+\frac {\left (a^2+b^2 \sqrt {-c^2}\right ) \tan (e+f x) (d \tan (e+f x))^m \, _2F_1\left (1,m+1;m+2;\frac {c \tan (e+f x)}{\sqrt {-c^2}}\right )}{2 f (m+1)}+\frac {4 a b (c \tan (e+f x))^{3/2} (d \tan (e+f x))^m \, _2F_1\left (1,\frac {1}{4} (2 m+3);\frac {1}{4} (2 m+7);-\tan ^2(e+f x)\right )}{c f (2 m+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 15
Rule 364
Rule 1286
Rule 1831
Rule 3670
Rubi steps
\begin {align*} \int (d \tan (e+f x))^m \left (a+b \sqrt {c \tan (e+f x)}\right )^2 \, dx &=\frac {c \operatorname {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2 \left (\frac {d x}{c}\right )^m}{c^2+x^2} \, dx,x,c \tan (e+f x)\right )}{f}\\ &=\frac {(2 c) \operatorname {Subst}\left (\int \frac {x \left (\frac {d x^2}{c}\right )^m (a+b x)^2}{c^2+x^4} \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}\\ &=\frac {\left (2 c (c \tan (e+f x))^{-m} (d \tan (e+f x))^m\right ) \operatorname {Subst}\left (\int \frac {x^{1+2 m} (a+b x)^2}{c^2+x^4} \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}\\ &=\frac {\left (2 c (c \tan (e+f x))^{-m} (d \tan (e+f x))^m\right ) \operatorname {Subst}\left (\int \left (\frac {2 a b x^{2+2 m}}{c^2+x^4}+\frac {x^{1+2 m} \left (a^2+b^2 x^2\right )}{c^2+x^4}\right ) \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}\\ &=\frac {\left (2 c (c \tan (e+f x))^{-m} (d \tan (e+f x))^m\right ) \operatorname {Subst}\left (\int \frac {x^{1+2 m} \left (a^2+b^2 x^2\right )}{c^2+x^4} \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}+\frac {\left (4 a b c (c \tan (e+f x))^{-m} (d \tan (e+f x))^m\right ) \operatorname {Subst}\left (\int \frac {x^{2+2 m}}{c^2+x^4} \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}\\ &=\frac {4 a b \, _2F_1\left (1,\frac {1}{4} (3+2 m);\frac {1}{4} (7+2 m);-\tan ^2(e+f x)\right ) (c \tan (e+f x))^{3/2} (d \tan (e+f x))^m}{c f (3+2 m)}+\frac {\left (c \left (b^2-\frac {a^2}{\sqrt {-c^2}}\right ) (c \tan (e+f x))^{-m} (d \tan (e+f x))^m\right ) \operatorname {Subst}\left (\int \frac {x^{1+2 m}}{\sqrt {-c^2}+x^2} \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}-\frac {\left (c \left (b^2+\frac {a^2}{\sqrt {-c^2}}\right ) (c \tan (e+f x))^{-m} (d \tan (e+f x))^m\right ) \operatorname {Subst}\left (\int \frac {x^{1+2 m}}{\sqrt {-c^2}-x^2} \, dx,x,\sqrt {c \tan (e+f x)}\right )}{f}\\ &=\frac {\left (a^2-b^2 \sqrt {-c^2}\right ) \, _2F_1\left (1,1+m;2+m;-\frac {c \tan (e+f x)}{\sqrt {-c^2}}\right ) \tan (e+f x) (d \tan (e+f x))^m}{2 f (1+m)}+\frac {\left (a^2+b^2 \sqrt {-c^2}\right ) \, _2F_1\left (1,1+m;2+m;\frac {c \tan (e+f x)}{\sqrt {-c^2}}\right ) \tan (e+f x) (d \tan (e+f x))^m}{2 f (1+m)}+\frac {4 a b \, _2F_1\left (1,\frac {1}{4} (3+2 m);\frac {1}{4} (7+2 m);-\tan ^2(e+f x)\right ) (c \tan (e+f x))^{3/2} (d \tan (e+f x))^m}{c f (3+2 m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.43, size = 151, normalized size = 0.71 \[ \frac {\tan (e+f x) (d \tan (e+f x))^m \left (\frac {a^2 \, _2F_1\left (1,\frac {m+1}{2};\frac {m+3}{2};-\tan ^2(e+f x)\right )}{m+1}+b \left (\frac {4 a \sqrt {c \tan (e+f x)} \, _2F_1\left (1,\frac {1}{4} (2 m+3);\frac {1}{4} (2 m+7);-\tan ^2(e+f x)\right )}{2 m+3}+\frac {b c \tan (e+f x) \, _2F_1\left (1,\frac {m+2}{2};\frac {m+4}{2};-\tan ^2(e+f x)\right )}{m+2}\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.43, size = 0, normalized size = 0.00 \[ {\rm integral}\left (2 \, \sqrt {c \tan \left (f x + e\right )} \left (d \tan \left (f x + e\right )\right )^{m} a b + {\left (b^{2} c \tan \left (f x + e\right ) + a^{2}\right )} \left (d \tan \left (f x + e\right )\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (\sqrt {c \tan \left (f x + e\right )} b + a\right )}^{2} \left (d \tan \left (f x + e\right )\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.93, size = 0, normalized size = 0.00 \[ \int \left (a +b \sqrt {c \tan \left (f x +e \right )}\right )^{2} \left (d \tan \left (f x +e \right )\right )^{m}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (\sqrt {c \tan \left (f x + e\right )} b + a\right )}^{2} \left (d \tan \left (f x + e\right )\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (a+b\,\sqrt {c\,\mathrm {tan}\left (e+f\,x\right )}\right )}^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (d \tan {\left (e + f x \right )}\right )^{m} \left (a + b \sqrt {c \tan {\left (e + f x \right )}}\right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________